package opc.read.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/**
 * @Description:  路径配置
 * @author: liyuan
 * @data 2021-01-15 08:49
 */
@Component
public class PathConf {
    @Value("${xianhe.jsonFile.path}")
    private String filePathConfig;
    @Value("${xianhe.timesFile.path}")
    private String timeJarConfig;
    @Value("${xianhe.isTestEnv}")
    private Boolean isTest;
    @Value("${xianhe.batFile.path}")
    private String batPathConfig;
    @Value("${xianhe.simu.server}")
    private Boolean isSimServerConf;
    @Value("${spring.kafka.bootstrap-servers}")
    private String kafkaServerConfig;

    public static String filePath;
    public static String timeJar;
    public static Boolean isTestEnv;
    public static String bathPath;
    public static Boolean isSimServer;
    public static String kafkaServer;
    @PostConstruct
    public void initFilePath() {
        filePath = filePathConfig;
        timeJar = timeJarConfig;
        isTestEnv=isTest;
        bathPath=batPathConfig;
        isSimServer=isSimServerConf;
        kafkaServer=kafkaServerConfig;
    }

}
